<template>
        <div class="msgcard">
          待维修处理
          <li class="msglist" v-for="(item,index) in repairdata.list" :key="item.id" :title="item.address+':'+item.content">
              <span>{{ index+1 }}、</span>
              <span class="ml_mid">{{ item.address }}</span>
              <span>:&emsp;{{ item.content }}</span>
          </li>
        </div>
        <div class="msgcard">待处理投诉
          <li class="msglist" v-for="(item,index) in questiondata.list" :key="item.id">
              <span>{{ index+1 }}、</span>
              <span class="ml_mid">{{ item.address }}</span>
              <span>:&emsp;{{ item.content }}</span>
          </li>
        </div> 
  </template>
  
  <script lang="ts" setup>
  import { reactive,onMounted } from "vue";
  import { repairsdata,questionsdata } from "../service/homeindex/pendingdata";
  //获取未处理报修
  let repairdata = reactive<any>({list:[]});
  const getrepairdata = async() => {
      let res = await repairsdata({state:0,page:1,psize:5}) ;
      repairdata.list = res.data.list;
  };
  //获取未处理问题
  let questiondata = reactive<any>({list:[]});
  const getquestionsdata = async() => {
      let res = await questionsdata({state:0,page:1,psize:5}) ;
      questiondata.list = res.data.list;
  };
  
  
  onMounted(() => {
      getrepairdata()
      getquestionsdata()
  })
  </script>
  
  <style lang="less" scoped>
  @import url(../assets/home/homeMsgCard.less);
  </style>
  